/**
 * Copyright(c)2012 Beijing PeaceMap Co.,Ltd.
 * All right reserved. 
 */
package com.pmc.dwa.common.exception;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.NestedRuntimeException;

/**
 * @description 全局运行时异常类
 * @author aokunsang
 * @date 2013-1-6
 */
public class PmcRuntimeException extends NestedRuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	protected static Log logger = LogFactory.getLog(PmcRuntimeException.class);
	
	public PmcRuntimeException(String msg) {
		super(msg);
		logger.warn((new StringBuilder()).append(getStackTrace()[0]).append(": ").append(msg).toString());
	}

	public PmcRuntimeException(String msg, Throwable cause) {
		super(msg, cause);
		logger.warn((new StringBuilder()).append(getStackTrace()[0]).append(": ").append(msg).toString(), cause);
	}
}
